module.exports = function ($scope, $state, $stateParams,$resource,$modal,$modalInstance,toaster,item) {
    if(item.code){
        $resource('/api/ac/puc/couponOrderService/getCouOrderByOrderCode', {}, {}).save({'order_code' : item.code}, function(res){
            if(res.errcode === 0){   
                console.log(res.data.getcouorder);
                console.log(res.data.getcouordercode);
                $scope.obj = res.data.getcouorder;
            }else{
                toaster.error({title:"",body:res.errmsg});
            }
        });
    }
    $scope.cancel = function(){
        $modalInstance.close();
    }
    


		


};
